import { request } from '@/utils';

/**
 * 绑定密钥
 * @param {*} data
 * companyId 企业ID
 * deployKey 密钥
 */
export function bindingDeployKey(data) {
  return request({
    url: `/deployKey/bindingDeployKey`,
    method: 'post',
    data,
  });
}
/**
 * 检查企业是否绑定密钥
 * @param {*} companyId
 */
export function checkCompanyBindingDeployKey(companyId) {
  return request({
    url: `/deployKey/checkCompanyBindingDeployKey`,
    method: 'get',
    data: { companyId },
  });
}

/**
 * 查询部署结果
 * @param {*} void
 * username
 */
export function getDeployResult(corpId) {
  return request({
    url: `/deployKey/getDeployResult`,
    method: 'get',
    showLoading: false,
    data: { corpId },
  });
}
/**
 * 获取应用安装二维码地址
 * @param {*} id
 * username
 */
export function getQrcode(companyId) {
  return request({
    url: `/applicationDeploy/getQrcode`,
    method: 'get',
    data: { companyId },
  });
}

/**
 * 查询二维码状态
 * @param {*} qrcodeKey
 * username
 */
export function getQrCodeStatus(qrcodeKey) {
  return request({
    url: `/applicationDeploy/getQrCodeStatus`,
    method: 'get',
    showLoading: false,
    data: { qrcodeKey },
  });
}
/**
 * 获取应用安装二维码
 * @param {*} void
 * username
 */
export function getApplicationQrcode() {
  return request({
    url: `/applicationDeploy/getApplicationQrcode`,
    method: 'get',
  });
}
